package com.pw.study.sql

import com.pw.study.utils.SparkUtils
import org.apache.spark.sql.{DataFrame, Dataset, SparkSession}

/**
 * @Desc: TODO
 * @author: future
 * @since: 2022/6/13-23:04
 */
object UserBySqlJob {
  private val appName = "UserBySqlJob"

  def main(args: Array[String]): Unit = {
    val session: SparkSession = SparkUtils.getEnvBySql(appName)
    val ds: Dataset[String] = session.read.textFile("data/file/user.txt")
    val df: DataFrame = session.read.text("data/file/user.txt")
    ds.printSchema()


  }
}
